package com.niguang.work.show.api.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author 12380
 * @since 2018-12-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UserReader extends Model<UserReader> {

    private static final long serialVersionUID = 1L;

    private Long id;

    private Long userId;

    /**
     * 1-进 2-出
     */
    private Integer reader;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime sysTime;

    @TableLogic
    private Boolean deleted;


    public static final String ID = "id";

    public static final String USER_ID = "user_id";

    public static final String READER = "reader";

    public static final String CREATE_TIME = "create_time";

    public static final String SYS_TIME = "sys_time";

    public static final String DELETED = "deleted";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
